<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Bayesian Network: bayesian/network/component.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Bayesian Network
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_4922399365a46b010edf8e4eee2a5dfb.html">bayesian</a></li><li class="navelem"><a class="el" href="dir_56c81f943e16f382d13475f1c8bedad4.html">network</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">component.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="component_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef BAYESIAN_NETWORKS_NETWORK_COMPONENT_HPP</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define BAYESIAN_NETWORKS_NETWORK_COMPONENT_HPP</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacebn.html">bn</a> {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">namespace </span>component {</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="classbn_1_1component_1_1random__variable.html">   21</a></span>&#160;<span class="keyword">class </span><a class="code" href="classbn_1_1component_1_1random__variable.html">random_variable</a> {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="classbn_1_1component_1_1random__variable.html#a0a46c33b798b825d9420a5c21ef954fb">   24</a></span>&#160;    std::size_t <a class="code" href="classbn_1_1component_1_1random__variable.html#a0a46c33b798b825d9420a5c21ef954fb">max_value</a> = 0;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;};</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classbn_1_1component_1_1node.html">   30</a></span>&#160;<span class="keyword">class </span><a class="code" href="classbn_1_1component_1_1node.html">node</a> {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keyword">using</span> random_variable_ptr = std::shared_ptr&lt;random_variable&gt;;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classbn_1_1component_1_1node.html#a1dcbc15e6fd36430222926753e28fb21">   36</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classbn_1_1component_1_1node.html#a1dcbc15e6fd36430222926753e28fb21">node</a>(random_variable_ptr <span class="keyword">const</span>&amp; <a class="code" href="classbn_1_1component_1_1random__variable.html">random_variable</a>)</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        : random_variable_(<a class="code" href="classbn_1_1component_1_1random__variable.html">random_variable</a>)</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    }</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classbn_1_1component_1_1node.html#a5abca8e9150caf424e6bb8ac37505ff0">   43</a></span>&#160;    random_variable_ptr <span class="keyword">get</span>() <span class="keyword">const</span> noexcept { <span class="keywordflow">return</span> random_variable_; }</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    random_variable_ptr <span class="keyword">const</span> random_variable_;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;};</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classbn_1_1component_1_1arc.html">   52</a></span>&#160;<span class="keyword">class </span><a class="code" href="classbn_1_1component_1_1arc.html">arc</a> {};</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="keyword">using</span> random_variable_ptr = std::shared_ptr&lt;random_variable&gt;;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">using</span> node_ptr = std::shared_ptr&lt;node&gt;;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">using</span> arc_ptr = std::shared_ptr&lt;arc&gt;;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;} <span class="comment">// namespace component</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;} <span class="comment">// namespace bn</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#endif // BAYESIAN_NETWORKS_NETWORK_COMPONENT_HPP</span></div><div class="ttc" id="namespacebn_html"><div class="ttname"><a href="namespacebn.html">bn</a></div><div class="ttdef"><b>Definition:</b> algorithm.hpp:16</div></div>
<div class="ttc" id="classbn_1_1component_1_1node_html"><div class="ttname"><a href="classbn_1_1component_1_1node.html">bn::component::node</a></div><div class="ttdoc">A class representing a node in network. </div><div class="ttdef"><b>Definition:</b> component.hpp:30</div></div>
<div class="ttc" id="classbn_1_1component_1_1random__variable_html"><div class="ttname"><a href="classbn_1_1component_1_1random__variable.html">bn::component::random_variable</a></div><div class="ttdoc">A class representing a random variable. </div><div class="ttdef"><b>Definition:</b> component.hpp:21</div></div>
<div class="ttc" id="classbn_1_1component_1_1node_html_a1dcbc15e6fd36430222926753e28fb21"><div class="ttname"><a href="classbn_1_1component_1_1node.html#a1dcbc15e6fd36430222926753e28fb21">bn::component::node::node</a></div><div class="ttdeci">node(random_variable_ptr const &amp;random_variable)</div><div class="ttdoc">(Constructor). </div><div class="ttdef"><b>Definition:</b> component.hpp:36</div></div>
<div class="ttc" id="classbn_1_1component_1_1random__variable_html_a0a46c33b798b825d9420a5c21ef954fb"><div class="ttname"><a href="classbn_1_1component_1_1random__variable.html#a0a46c33b798b825d9420a5c21ef954fb">bn::component::random_variable::max_value</a></div><div class="ttdeci">std::size_t max_value</div><div class="ttdoc">The maximum value that this random variable can take. </div><div class="ttdef"><b>Definition:</b> component.hpp:24</div></div>
<div class="ttc" id="classbn_1_1component_1_1arc_html"><div class="ttname"><a href="classbn_1_1component_1_1arc.html">bn::component::arc</a></div><div class="ttdoc">A class representing a arc in network. </div><div class="ttdef"><b>Definition:</b> component.hpp:52</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
